package cn.iocoder.yudao.module.crm.controller.open.clue;


import cn.hutool.json.JSONUtil;
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils;
import cn.iocoder.yudao.module.call.api.record.CallRecordApi;
import cn.iocoder.yudao.module.crm.service.clue.CrmClueDistributeConfigService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Tag(name = "OPEN - 线索")
@RestController
@RequestMapping("/crm/test")
@Slf4j
public class CrmOpenTestController {


    @Resource
    private CallRecordApi callRecordApi;

    @GetMapping("test")
    @OperateLog(enable = false)
    @TenantIgnore
    public String test() {
        List<Long> levelList = new ArrayList<>();
        levelList.add(8L);
        return JSONUtil.toJsonStr(TenantUtils.execute(211L, () -> callRecordApi.getRecordListTransClue(10, 1L, "39", levelList)));

    }


}
